<?php 
/* get website title */
if(!function_exists("nvr_footer_text")){
	function nvr_footer_text(){
		
		$shortname = THE_SHORTNAME;
		
		$foot= stripslashes(nvr_get_option( $shortname . '_footer'));
		if($foot==""){
		
			_e('Copyright', THE_LANG ); echo ' &copy;';
			global $wpdb;
			$post_datetimes = $wpdb->get_results("SELECT YEAR(min(post_date_gmt)) AS firstyear, YEAR(max(post_date_gmt)) AS lastyear FROM $wpdb->posts WHERE post_date_gmt > 1970");
			if ($post_datetimes) {
				$firstpost_year = $post_datetimes[0]->firstyear;
				$lastpost_year = $post_datetimes[0]->lastyear;
	
				$copyright = $firstpost_year;
				if($firstpost_year != $lastpost_year) {
					$copyright .= '-'. $lastpost_year;
				}
				$copyright .= ' ';
	
				echo $copyright;
				echo '<a href="'.home_url( '/').'">'.get_bloginfo('name') .'.</a>';
			}
			?> 
			<?php _e('Designed by', THE_LANG ); ?> 
            <a href="<?php echo esc_url( __( 'http://www.novarostudio.com', THE_LANG) ); ?>" title="<?php _e('Novaro Studio', THE_LANG); ?>"><?php _e('Novaro Studio', THE_LANG); ?></a>
        <?php 
		}else{
        	echo $foot;
        }
		
	}/* end nvr_footer_text() */
}